//
//  SHUserSettingCell.m
//  JiFengDaRen
//
//  Created by SH_iOS on 2017/5/27.
//  Copyright © 2017年 SH_iOS. All rights reserved.
//

#import "SHUserSettingCell.h"

@implementation SHUserSettingCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        
        self.titleLabel = [SHLabel labelWithTextFont:15 textColor:KSHTEXTCOLOR textAlignment:0];
        
        [self.contentView addSubview:self.titleLabel];
        
        self.contentLabel = [SHLabel labelWithTextFont:12 textColor:[UIColor colorWithHexString:@"#b3b3b3"] textAlignment:2];
        [self.contentView addSubview:self.contentLabel];
        
        self.line = [[UIView alloc]initWithFrame:CGRectMake(__I6Width(15),__I6Height(44.5), KScreenWidth, 0.5)];
        self.line.backgroundColor = KLINECOLOR;
        [self.contentView addSubview:self.line];
        
    }
    
    return self;
}

- (void)layoutSubviews{
   [super layoutSubviews];

    [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.height.mas_equalTo(__I6Height(15));
        make.left.mas_equalTo(self.contentView.mas_left).with.offset(__I6Width(15));
        make.centerY.mas_equalTo(self.mas_centerY);
        
    }];
    [self.contentLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.height.mas_equalTo(__I6Height(12));
        make.right.mas_equalTo(self.contentView.mas_right).with.offset(__I6Width(-32));
        make.centerY.mas_equalTo(self.mas_centerY);
        
    }];

    
        
}

- (void)setTitle:(NSString *)title{
    _titleLabel.text = title;
}

- (void)setContent:(NSString *)content{
    _contentLabel.text = content;

}

- (void)setHighlighted:(BOOL)highlighted animated:(BOOL)animated{
    [super setHighlighted:highlighted animated:animated];
    if (highlighted) {
        self.backgroundColor = KCELLHIGHTLIGHTED;
    }else{
        
        self.backgroundColor = [UIColor whiteColor];
        
    }
    
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated{
    [super setSelected:selected animated:animated];
    
    if (selected) {
        
        self.backgroundColor = KCELLHIGHTLIGHTED;
    }else{
        
        self.backgroundColor = [UIColor whiteColor];

       
        

        
    }
    
    
}


@end
